home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / tools / czesc_2 / jm / docs / jmrexx.doc < prev    next >
Text File  |  1992-04-04  |  7KB  |  331 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.                               JM ARexx Reference Guide
  17.  
  18.  
  19.                        A Task Management System for the Amiga
  20.  
  21.                                      Version 1.1
  22.  
  23.  
  24.                                   (Copyright) 1992
  25.  
  26.                                      Steve Koren
  27.  
  28.                                     April 4, 1992
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.           Table of Contents
  74.  
  75.           Introduction to the JM......................................3
  76.           Example Use.................................................3
  77.           ARexx Reference.............................................3
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.           JM Job Management             Page 2             ARexx Reference
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.           Introduction to the JM ARexx Server
  140.  
  141.             By  default, the JM server starts an ARexx port when the server
  142.             starts.  This port  allows external programs to query the state
  143.             of the JM server and  the  Amiga  system, and to change certain
  144.             values.  This document describes JM ARexx commands.
  145.  
  146.  
  147.           Example Use
  148.  
  149.             The  following short  ARexx  program provides an example of how
  150.             to access returned values from JM ARexx commands.
  151.  
  152.                /* Sample ARexx program to query system load average */
  153.  
  154.                options results     /* we want to hear about results     */
  155.                address jmserver    /* connect to JM server's ARexx port */
  156.  
  157.                sysload             /* figure out idle cpu time          */
  158.                load = result       /* we get: load average times 100    */
  159.  
  160.                say "System load average is approx:" load/100
  161.  
  162.             The  "options results" command must be present to tell ARexx to
  163.             listen for  return values from JM commands.  "address jmserver"
  164.             connects to JM's ARexx  port.   "sysload" calls the appropriate
  165.             JM ARexx command.  (One could also  use  "address jmserver sys-
  166.             load"  if  only  one  command is to be executed from JM's ARexx
  167.             port).   The   "sysload" command could be used, for example, to
  168.             take  various actions in another application's ARexx script de-
  169.             pending on the Amiga's load average.
  170.  
  171.             Several  other  short  example ARexx programs are included with
  172.             JM.    Future versions of JM may be able to send outgoing ARexx
  173.             message if  certain system conditions become true (such as, CPU
  174.             load goes  above  or  below a given number, etc).  A future ex-
  175.             tention may also  permit specific task information to be deter-
  176.             mined though the ARexx  port.   These  abilities are not preset
  177.             in JM 1.1.
  178.  
  179.  
  180.           ARexx Reference
  181.  
  182.             NUM_START         - Returns  the  number of tasks started since
  183.                                 the JM server was invoked.
  184.  
  185.             NUM_FINISH        - Returns the  number of tasks finished since
  186.                                 the JM server was invoked.
  187.  
  188.             IDLE_CPU          - Returns the idle CPU %,  multiplied by 100.
  189.                                 For example, "50" would be 50%, etc.
  190.  
  191.             MIN_MANAGE_PRI    - Returns  the  JM  minimum  manage  priority
  192.                                 level.   With  one   optional numeric argu-
  193.  
  194.  
  195.           JM Job Management             Page 3             ARexx Reference
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.                                 ment, sets the same.
  206.  
  207.             MAX_MANAGE_PRI    - Returns  the  JM  maximum  manage  priority
  208.                                 level.   With  one   optional numeric argu-
  209.                                 ment, sets the same.
  210.  
  211.             TOT_IDLE_CPU      - Returns  the  total idle CPU time since the
  212.                                 JM server  was  invoked, in 1/60s of a sec-
  213.                                 ond for NTSC systems, and 1/50s for PAL.
  214.  
  215.             TOT_USED_CPU      - Similar to TOT_IDLE_CPU, but for  used  CPU
  216.                                 time.
  217.  
  218.             VBLANK            - Returns "60" for an NTSC system,  and  "50"
  219.                                 for  PAL.   Useful  with  TOT_IDLE_CPU  and
  220.                                 TOT_USED_CPU   to   convert    them    into
  221.                                 hours/minutes/seconds.
  222.  
  223.             QUANTUM           - Returns the JM  time  quantum in 1/10ths of
  224.                                 a second.  (Ie.,  5  is  1/2  second, etc).
  225.                                 With  one  optional  numeric argument, sets
  226.                                 the same.
  227.  
  228.             MANAGED_NUM       - Returns  the  number of tasks currently un-
  229.                                 der  JM  task  management,  or  the  number
  230.                                 which  would  be  if  management was turned
  231.                                 on.
  232.  
  233.             MANAGESWITCH      - Returns "on" or "off"  corresponding to the
  234.                                 value of JM task management.  With one  op-
  235.                                 tional  parameter, sets  the  manage switch
  236.                                 to that value.
  237.  
  238.             LOGSWITCH         - Returns "on" or "off"  corresponding to the
  239.                                 value of JM task  logging.   With  one  op-
  240.                                 tional  parameter,  sets  logging  to  that
  241.                                 value.
  242.  
  243.             LOGFILE           - Returns the JM log file name.
  244.  
  245.             LOGFAILED         - Returns  the  number of failed  logging at-
  246.                                 tempts by the JM server.
  247.  
  248.             WATCHSWITCH       - Returns "on" or "off"  corresponding to the
  249.                                 value of the JM task  watch  switch.   With
  250.                                 one  optional  parameter,  sets  the  watch
  251.                                 switch to that value.
  252.  
  253.             INSTALL_DELAY     - Returns the value of the  JM  task  install
  254.                                 delay (see  JM.doc  for  details), in 10ths
  255.                                 of  a  second.   (5  is  1/2  second, etc).
  256.                                 With  one  optional  numeric argument, sets
  257.                                 the same.
  258.  
  259.  
  260.  
  261.           JM Job Management             Page 4             ARexx Reference
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.             SYSLOAD           - Returns  the  system  load  average for the
  272.                                 past  10  seconds, multiplied by 100.  (Ie,
  273.                                 100 is a load of 1, etc).
  274.  
  275.             READ_RC           - Returns   nothing,  but  instructs  the  JM
  276.                                 server to re-read the .jmrc file.
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.           JM Job Management             Page 5             ARexx Reference
  328.  
  329.  
  330.  
  331.